package cn.xej.health.user.dao;

import cn.xej.health.user.entity.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author xej
 */
@Mapper
public interface UserDao extends BaseMapper<User> {
    /**
     * 查询所有用户
     * @param startNum
     * @param endNum
     * @param searchName
     * @return
     */
    List<User> queryUserList(@Param("startNum") Integer startNum,@Param("endNum") Integer endNum,@Param("searchName")String searchName);


    /**
     * 查询剩余团队长
     * @param rid
     * @param status
     * @return
     */
    List<User> queryCaptainList(@Param("rid") Integer rid,@Param("status")Integer status);

    /**
     * 获取该团队的医生
     * @param tid
     * @param startNum
     * @param endNum
     * @param searchName
     * @return
     */
    List<User> queryMemberList(@Param("tid") Integer tid,@Param("startNum") Integer startNum,@Param("endNum") Integer endNum,@Param("searchName")String searchName);

    /**
     * 获取团队医生数量
     * @param tid
     * @param searchName
     * @return
     */
    Integer memberCount(@Param("tid")Integer tid,@Param("searchName")String searchName);

    /**
     * 获取剩余的医生
     * @return
     */
    List<User> queryRemainUserList();
}
